using Microsoft.EntityFrameworkCore;
using UniversalAdmin.Infrastructure.Data.Contexts;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddDbContext<ApplicationDbContext>(options =>
options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection"))); // 注册数据库上下文

builder.Services.AddControllers();

var app = builder.Build();

app.MapControllers();

app.Run();
